import request from '@/utils/request'

// 查询
export function templateList(query) {
    return request({
        url: '/library/template/treeList',
        method: 'get',
        params: query
    })
}

// 新增
export function addTemplate(data) {
    return request({
        url: '/library/template',
        method: 'post',
        data: data
    })
}

//详情
export function getTemplateDetails(query) {
    return request({
        url: '/library/template/details',
        method: 'get',
        params: query
    })
}

// 修改
export function updateTemplate(data) {
    return request({
        url: '/library/template',
        method: 'put',
        data: data
    })
}

// 删除
export function deleteTemplate(id) {
    return request({
        url: '/library/template/' + id,
        method: 'delete'
    })
}